//
//  GlobalPch.swift
//  FirstSwiftProduct
//
//  Created by 范泽华 on 2017/10/10.
//  Copyright © 2017年 范泽华. All rights reserved.
//

import UIKit
import SDWebImage
import Alamofire
import YYKit


/** 热门页接口*/
let kHotLiveAPI = "http://116.211.167.106/api/live/aggregation?uid=133825214&interest=1"

/******************************* api  *********************************/
let mainURL = "https://api.zihe8888.com/api/"
let staticURL = "https://static.zihe8888.com"
let wapURL = "https://wap.zihe8888.com"

/******************************* 注册api  *********************************/
let isRegister = "Passport/IsRegister" //是否注册
let sendSmsCode = "Common/SendSmsCode" //验证码

let Register = "Passport/Register" //注册

let VerifyPhoneCode = "Passport/VerifyPhoneCode"//验证
let ImageCode = "Common/ImageCode" //

/******************************* 登录api  *********************************/
let LoginPath = "Passport/Login"

//文章列表----消息列表
let ArticleListPath = "Content/ArticleList"

//文章列表----消息详情
let NoticePath = "Content/Notice"

//轮播图片
//#define  yt_PicAdvert_Path   @"Content/PicAdvert"
let PicAdvertPath = "Content/PicAdvert"




//首页数据
//#define  yt_ProductHome_Path   @"Product/Home"
let ProductHomePath = "Product/Home"

//会员签到
//#define  yt_Sign_Path   @"Member/Sign"
let SignPath = "Member/Sign"


//会员签到判定
//#define  yt_SignAmount_Path   @"Member/SignAmount"
let SignAmountPath = "Member/SignAmount"


//会员当月签到信息
//#define  yt_SignMonth_Path   @"Member/SignMonth"
let SignMonthPath = "Member/SignMonth"



/******************************* 地址api  *********************************/
//获取地区信息
//#define  yt_Area_Path   @"Common/Area"
let AreaPath = "Common/Area"

//获取收获地址
//#define  yt_ShippingAddress_Path   @"Member/ShippingAddress"
let ShippingAddressPath = "Member/ShippingAddress"

//添加收获地址
//#define  yt_InsertShippingAddress_Path   @"Member/InsertShippingAddress"
let InsertShippingAddressPath = "Member/InsertShippingAddress"

//修改收获地址
//#define  yt_UpdateShippingAddress_Path   @"Member/UpdateShippingAddress"
let UpdateShippingAddressPath = "Member/UpdateShippingAddress"

//删除收获地址
//#define  yt_DeleteShippingAddress_Path   @"Member/DelShippingAddress"?
let DeleteShippingAddressPath = "Member/DelShippingAddress"

////获取一条收获地址
//#define  yt_DetailShippingAddress_Path   @"Member/DetailShippingAddress"
//
////  判断是否设置支付密码 Member/CheckPayPassword  20161220新添加
//#define  yt_CheckPayPassword_Path   @"Member/CheckPayPassword"
//
////获取绑定的银行卡－－－即判定是否有没有绑定过银行卡
//#define  yt_BindBank_Path   @"Member/BindBank"
//
//
////绑定银行卡
//#define  yt_SetBindBank_Path   @"Member/SetBindBank"
////绑定银行卡推进
//#define  yt_SetBindBankAdvance_Path   @"Member/SetBindBankAdvance"
//
////解绑银行卡
//#define  yt_UnbindBank_Path   @"Member/UnbindBank"
////解绑银行卡推进
//#define  yt_UnbindBankAdvance_Path   @"Member/UnbindBankAdvance"
//
////获取会员资金明细
//#define  yt_MemberFunds_Path   @"Financial/MemberFunds"
//
////获取会员资金流水*
//#define  yt_CapitalFlow_Path   @"Financial/CapitalFlow"
//
////提现申请
//#define  yt_InsertExtract_Path   @"Financial/InsertExtract"
//
////获取会员充值
//#define  yt_Recharge_Path   @"Financial/Recharge"
////会员充值推进
//#define  yt_RechargeAdvance_Path   @"Financial/RechargeAdvance"
//
////修改密码
//#define  yt_UpdatePassword_Path   @"Member/UpdatePassword"
////直接设置密码
//#define  yt_SetPassword_Path   @"Member/SetPassword"
//
//
////获取支持银行数据
//#define  yt_FinancialBank_Path   @"Financial/Bank"
////提现申请
//#define  yt_InsertExtract_Path   @"Financial/InsertExtract"
//
//
////获取服务器时间
//#define  yt_NowDate_Path   @"Common/NowDate"
////图片上传
//#define  yt_Upload_Path   @"Common/Upload"


//项目列表
//#define  yt_ProductList_Path   @"Product/ProductList"
let ProductListPath = "Product/ProductList"

//项目明细
//#define  yt_ProductDetail_Path   @"Product/ProductDetail"
let ProductDetailPath = "Product/ProductDetail"

//体验标详情
//#define  yt_GetMemberExperience_Path   @"Member/GetMemberExperience"

//#define  yt_GetMemberExperience_Path   @"Member/MemberExperienceAmount"
//
//
//
////查询项目投资记录
//#define  yt_ItemByProduct_Path   @"Product/ItemByProduct"
////查询会员投资记录
//#define  yt_ItemByMember_Path   @"Product/ItemByMember"
//
////竞标中+还款中
//#define  yt_ItemsByMember_Path   @"Product/ItemsByMember"
//
//#define  yt_ItemByMemberS_Path   @"Product/ItemByMembers"
//
////我的邀请
//#define  yt_MyInvite_Path   @"Member/Inviter"
//
////体验金
//#define  yt_tiyanjin_Path  @"Member/Experience"
////体验金收益提取
//#define  yt_WithdrawProfit_Path  @"Member/WithdrawProfit"
//
//
//
////获取实名认证信息
//#define yt_shiming_Path @"Member/RealName"
//
////设置实名认证
//#define yt_signRealName_Path @"Member/SetRealName"
//
////投资
//#define yt_buy_Path @"Product/Buy"
//
////预计收益
//#define yt_ExpectedEarning_Path @"Product/Interest"
//
////会员优惠券
//#define yt_youhuijuan_Path  @"Member/Coupons"
//
////我的奖励 签到奖励
//#define yt_SignList_Path  @"Member/SignList"
//
////会员债转信息
//#define yt_ItemDebtSell_Path  @"Product/ItemDebtSell"
////债转申请
//#define yt_Apply_Path  @"Product/Apply"
//
//
////获取绑定银行卡访问地址
//#define yt_BindBankByUrl_Path @"Member/BindBankByUrl"
//
//
////忘记密码
//#define  yt_ForgetPassword_Path   @"Member/ForgetPassword"
//
////活动列表
//#define  yt_Sales_Path  @"Product/Sales"
//
//
////投资失败返还 投资金时间
//#define  yt_Config_Path  @"Common/Config"
//
//
//// 文章详情 即活动详情
//#define  yt_ArticleDetail_Path @"Content/ArticleDetail"
//
//// 文章详情 即修改文案
//#define  yt_ArticleDetailByMetaTitle_Path @"Content/ArticleDetailByMetaTitle"
//
////判定 是非是投资过的新手标
//#define yt_InvestNewerBid_path  @"Product/InvestNewerBid"


//获取客服电话
//#define yt_ServiceTel_path @"Common/ServiceTel"
let ServiceTelPath = "Common/ServiceTel"


//获取关于我们
//#define yt_AboutUs_path @"Common/AboutUs"
let AboutUsPath = "Common/AboutUs"


/******************************* size  *********************************/
//tabbar高度
let kTabBarHight:CGFloat = 49
//状态栏高度
let kStatus_bar_height = 20
//导航栏高度
let kNavigation_bar_height = 44

//状态栏 + 导航栏高度
let kStatus_Navigation_height = kStatus_bar_height + kNavigation_bar_height


//屏幕rect
let SCREEN_WIDTH = UIScreen.main.bounds.size.width

let SCRENN_HEIGHT = UIScreen.main.bounds.size.height

let SCREEN_BOUNDS = UIScreen.main.bounds

//顶部电池条的状态栏高度
let kStatubarHeight = UIApplication.shared.statusBarFrame.size.height

//相对iphone6 屏幕缩放比
let scaleHeight = SCRENN_HEIGHT / 667.0
let scaleWidth = SCREEN_WIDTH / 375.0

func MY_CGRECTMAKE(x:CGFloat,y:CGFloat,width:CGFloat,height:CGFloat) -> CGRect {
    let rect = CGRect(x: x * scaleWidth, y: y * scaleHeight, width: width * scaleWidth, height: height * scaleHeight)
    return rect
    
}

/******************************* system *********************************/

//大字
let kCusBigTextFont = UIFont.init(name: "FZShaoEr-M11S", size: 22)
//常规
let kCusMidTextFont = UIFont.init(name: "FZShaoEr-M11S", size: 20)
//小字
let kCustomSmallTextFont = UIFont.init(name: "FZShaoEr-M11S", size: 15)
//系统大字
let kBigTextFont = UIFont.systemFont(ofSize: 16)
//系统常规
let kMidTextFont = UIFont.systemFont(ofSize: 14)
//系统小字
let kSmallTextFont = UIFont.systemFont(ofSize: 12)



/*******************************   颜色  *********************************/
//项目主题颜色 字体大小等
let kThemeColor = UIColor.colorWithHexString_alpha(alpha: 1.0, color: "#d9261c")
let kMaxTextFont = 17
let kMargin = 8
let kMainOrange = UIColor.colorWithHexString_alpha(alpha: 1.0, color: "#c6aa69")
let MainTextColor = UIColor.colorWithHexString_alpha(alpha: 1.0, color: "#ffffff")

let kBlackTextColor = UIColor.colorWithHexString_alpha(alpha: 1.0, color: "#333333")
let kBgColor = UIColor.colorWithHexString_alpha(alpha: 1.0, color: "#f7f7f7")
let kTextFieldColor = UIColor.colorWithHexString_alpha(alpha: 1.0, color: "#e9e9e9")
let kPlaceholderColor = UIColor.colorWithHexString_alpha(alpha: 1.0, color: "#e6e6e6")
let klineColor = UIColor.colorWithHexString_alpha(alpha: 1.0, color: "#ebebeb")

let ktextColor = UIColor.colorWithHexString_alpha(alpha: 1.0, color: "#2B2B2B")


//背景灰色
let kBgDarkColor = UIColor.colorWithHexString_alpha(alpha: 1.0, color: "#efefef")
//背景白色
let kBgWhiteColor = UIColor.colorWithHexString_alpha(alpha: 1.0, color: "#FFFFFF")
//边框颜色
let kBorderLineColor = UIColor.colorWithHexString_alpha(alpha: 1.0, color: "#e4e4e4")
//边框粗细
let kBorderLineThickness = 0.8
//默认黑
let kBlackColor = UIColor.colorWithHexString_alpha(alpha: 1.0, color: "#303030")
//中性黑 偏灰
let kMidBlackColor = UIColor.colorWithHexString_alpha(alpha: 1.0, color: "#707070")
//浅黑 textfield等placehorder文字颜色、时间
let minBlackColor = UIColor.colorWithHexString_alpha(alpha: 1.0, color: "#ababab")
//用于cell灰色
let kCellBackGroundColor = UIColor.colorWithHexString_alpha(alpha: 1.0, color: "#fafafa")
//cell边线粗细
let kBorderCellLineThickness = 8
//橙色
let kOrangeColor = UIColor.colorWithHexString_alpha(alpha: 1.0, color: "#ff9900")
//红色
let kRedColor = UIColor.colorWithHexString_alpha(alpha: 1.0, color: "#fd0305")
//橘红色
let kHyacinthColor = UIColor.colorWithHexString_alpha(alpha: 1.0, color: "#f95b03")
//蓝青色
let kIndingoColor = UIColor.colorWithHexString_alpha(alpha: 1.0, color: "#12acf2")
//绿色
let kgreenColor = UIColor.colorWithHexString_alpha(alpha: 1.0, color: "#56ba22")
//蓝色
let kBlueColor = UIColor.colorWithHexString_alpha(alpha: 1.0, color: "#4cbaff")

//RGB颜色
func RGBColor(r:CGFloat,g:CGFloat,b:CGFloat)->(UIColor){
    return UIColor.init(red: r, green: g, blue: b, alpha: 1.0)
}

//随机色
func FzhRandColor()->UIColor{
    return RGBColor(r: CGFloat(arc4random_uniform(256)), g: CGFloat(arc4random_uniform(256)), b: CGFloat(arc4random_uniform(256)))
}












